import ck from 'js-cookie'

export function SetCookie(name, value, expires) {
    // 按小时计算有效期
    var inFifteenMinutes = new Date(new Date().getTime()+ expires*60*60*1000);
    if (expires) {
        return ck.set(name, value, { expires: inFifteenMinutes})
    }else {
        return ck.set(name, value, { expires: 1 })
    }
}

export function GetCookie(name) {
    return ck.get(name)
}


export function DelCookie(name) {
    return ck.remove(name)
}